package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 突破学区对应学校明细表
 *
 * @author chenzh
 * @since 2023-06-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_break_through_detail")
@Schema(name = "EduBreakThroughDetail", title = "突破学区对应学校明细表", description = "突破学区对应学校明细表实体类")
public class EduBreakThroughDetail extends Model<EduBreakThroughDetail> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "breakThroughDetailId", title = "主键")
    @TableId(value = "break_through_detail_id", type = IdType.ASSIGN_ID)
    private Long breakThroughDetailId;

    @Schema(name = "breakThroughId", title = "突破学区主键")
    @TableField(value = "break_through_id")
    private Long breakThroughId;

    @Schema(name = "schoolId", title = "学校id")
    @TableField(value = "school_id")
    private String schoolId;

    @Schema(name = "schoolName", title = "学校名称")
    @TableField(value = "school_name")
    private String schoolName;

    @Schema(name = "configNameList", title = "招生类别，逗号隔开")
    @TableField(value = "config_name_list")
    private String configNameList;

    @Schema(name = "remark", title = "备注")
    @TableField(value = "remark")
    private String remark;

    @Schema(name = "createName", title = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", title = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", title = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", title = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", title = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.breakThroughDetailId;
    }
}
